//
//  ADSEWaterDataManager.h
//  CoolCam
//
//  Created by lsq on 2022/6/16.
//  Copyright © 2022 JXW. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^CallBackBlock)(NSMutableArray *gpsData, float maxValue);
typedef void(^newCallBackBlock)(NSMutableArray *gpsData, float maxValue, float lineWith);
typedef void(^speedBackBlock)(int fast, int slow);
typedef void(^turnBackBlock)(int left, int right);

@interface ADSEWaterDataManager : NSObject

+ (instancetype)sharedInstance;

// 经纬度数据优化
- (NSMutableArray *)handleGPSData:(NSMutableArray *)dataSource;

// 对角度数据优化
- (NSMutableArray *)handleAngle:(NSMutableArray *)gpsDataArr;

// 经纬度数据转换成直角坐标，轨迹会圆重叠
- (void)newHandleMap:(NSArray *)mapArr viewWidth:(float)with callBack:(newCallBackBlock)callBackBlock;

// 计算行驶的距离
- (float)calculateDistance:(NSArray *)gpsDataArr;

// 计算减速和加速的次数
- (void)calculateSpeedFastAndSlow:(NSArray *)gpsDataArr speedBackBlock:(speedBackBlock)speedBackBlock;

// 转向处理
- (NSMutableArray *)handleTurn:(NSMutableArray *)gpsDataArr;

// 直走和等待的数据处理
- (NSMutableArray *)handelstraightWait:(NSMutableArray *)gpsDataArr angleRuleArr:(NSMutableArray *)angleRuleArr;
    
// 左右转向次数总结
- (void)calculateTurnLeftAndRight:(NSMutableArray *)angleRuleArr turnBackBlock:(turnBackBlock)turnBackBlock;

// 爬升高度
- (float)climbHeight:(NSArray *)gpsDataArr;

@end

NS_ASSUME_NONNULL_END
